<template>
  <div>
    {{ count }}个公式
  </div>
</template>
<script>
export default {
  props: {
    formId: {
      type: String,
      default: ''
    }
  },
  data () {
    return {
      count: 0
    }
  },
  watch: {
    formId () {
      this.searchCount()
    }
  },
  mounted () {
    this.searchCount()
  },
  methods: {
    searchCount () {
      this.$http.get('/zg-autoform/formula/count', { formId: this.formId }, data => {
        this.count = data
      })
    }
  }
}
</script>

<style lang="scss" scoped>
</style>
